
package com.csc440.team2.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import com.csc440.team2.smil.SMILTextComponent;


public class MessagePosition extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.position_layout_text);
    }


    public void returnToParent(View clickedView)
    {
        Intent data = new Intent();
        SMILTextComponent comp = SMILTextComponent.create();
        comp.setDuration(Integer.parseInt(((EditText) this.findViewById(R.id.EditText02)).getText().toString()));
        comp.setText(((EditText) this.findViewById(R.id.EditText01)).getText().toString());
        data.putExtra("test", comp);
        setResult(1, data);
        finish();
    }
}
